package com.minke.springboot.controller;

import com.minke.springboot.domin.MyEvnProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {

    private MyEvnProperties myEvnProperties;

    @Autowired
    public void setMyEvnProperties(MyEvnProperties myEvnProperties) {
        this.myEvnProperties = myEvnProperties;
    }

    @RequestMapping(value = "/say",method = {RequestMethod.GET})
    public @ResponseBody String Say(){
        return "Hello,多环境下核心配置文件<br/>当前环境："+myEvnProperties.getEnv();
    }


}
